Do not modify a const GdkEvent in place
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 26 Jun 2018 16:57:29 +0000 (17:57 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 26 Jun 2018 17:06:23 +0000 (18:06 +0100)
commit73d736d800270bad8fb355b959a570b45d58ff1d
treea611634518c40cb567f17b95ff3a1374385aed97
parent88b4076fe5146c84e5a9fb590371c50917be604e
Do not modify a const GdkEvent in place

When deciding whether or not to emulate a press event, we're translating
the last event coordinates and mutating the given event structure
unconditionally.

We should modify the newly created GdkEvent copy, since it's what we're
going to use when emitting the press event.

This avoids mutating a constant GdkEvent and global state, and also
avoids a compiler warning.
gtk/gtkwidget.c